class MicrobitImage(object):
    '''
        5PX 点阵图
    '''
    def __init__(self, data):
        if MicrobitImage.__dict__[data]:
            self.data = MicrobitImage.__dict__[data]
        else:
            self.data = data

    def get_pixel(self, x, y):
        pos = (x - 1) * 6 + y
        return self.data[pos]
    
    def __str__(self) -> str:
        return self.data
    
    def show(self):
        lines = self.data.split(':')
        for line in lines:
            print(line)

    
Image0 = "09900:90090:90090:90090:09900:"
Image1 = "00900:09900:00900:00900:09990:"
Image2 = "99900:00090:09900:90000:99990:"
Image3 = "99990:00090:00900:90090:09900:"
Image4 = "00990:09090:90090:99999:00090:"
Image5 = "99999:90000:99990:00009:99990:"
Image6 = "00090:00900:09990:90009:09990:"
Image7 = "99999:00090:00900:09000:90000:"
Image8 = "09990:90009:09990:90009:09990:"
Image9 = "09990:90009:09990:00900:09000:"
Imagep = "00000:00000:00000:09000:00000:"

setattr(MicrobitImage, '0', Image0)  
setattr(MicrobitImage, '1', Image1) 
setattr(MicrobitImage, '2', Image2) 
setattr(MicrobitImage, '3', Image3) 
setattr(MicrobitImage, '4', Image4) 
setattr(MicrobitImage, '5', Image5) 
setattr(MicrobitImage, '6', Image6) 
setattr(MicrobitImage, '7', Image7) 
setattr(MicrobitImage, '8', Image8)
setattr(MicrobitImage, '9', Image9)
setattr(MicrobitImage, '.', Imagep)